diff --git a/obmc/dbuslib/bindings.py b/obmc/dbuslib/bindings.py
index 8a04447..3eea6a5 100644
--- a/obmc/dbuslib/bindings.py
+++ b/obmc/dbuslib/bindings.py
@@ -187,7 +187,7 @@
         obj = self.objects.pop(object_path, None)
         obj.remove_from_connection()
         if self._export:
-            self.InterfacesRemoved(object_path, list(obj.properties.keys()))
+            self.InterfacesRemoved(object_path, obj.properties.keys())
 
     def get(self, object_path, default=None):
         return self.objects.get(object_path, default)
@@ -197,7 +197,7 @@
         in_signature='', out_signature='a{oa{sa{sv}}}')
     def GetManagedObjects(self):
         data = {}
-        for objpath in list(self.objects.keys()):
+        for objpath in self.objects.keys():
             data[objpath] = self.objects[objpath].properties
         return data
 
diff --git a/obmc/dbuslib/introspection.py b/obmc/dbuslib/introspection.py
index 5288bcb..9ec9c05 100644
--- a/obmc/dbuslib/introspection.py
+++ b/obmc/dbuslib/introspection.py
@@ -104,7 +104,7 @@
 
     def _discover_flat(self, path, parser):
         items = {}
-        interfaces = list(parser.get_interfaces().keys())
+        interfaces = parser.get_interfaces().keys()
         if interfaces:
             items[path] = {}
             items[path]['interfaces'] = interfaces
diff --git a/obmc/dbuslib/propertycacher.py b/obmc/dbuslib/propertycacher.py
index ebbe92a..7888b46 100644
--- a/obmc/dbuslib/propertycacher.py
+++ b/obmc/dbuslib/propertycacher.py
@@ -15,7 +15,7 @@
 # permissions and limitations under the License.
 
 import os
-import pickle
+import cPickle
 import json
 
 CACHE_PATH = '/var/cache/obmc/'
@@ -28,7 +28,7 @@
 
 
 def save(obj_path, iface_name, properties):
-    print("Caching: "+obj_path)
+    print "Caching: "+obj_path
     filename = getCacheFilename(obj_path, iface_name)
     parent = os.path.dirname(filename)
     try:
@@ -39,11 +39,11 @@
                 ## use json module to convert dbus datatypes
                 props = json.dumps(properties[iface_name])
                 prop_obj = json.loads(props)
-                pickle.dump(prop_obj, output)
+                cPickle.dump(prop_obj, output)
             except Exception as e:
-                print("ERROR: "+str(e))
+                print "ERROR: "+str(e)
     except:
-        print("ERROR opening cache file: "+filename)
+        print "ERROR opening cache file: "+filename
 
 
 def load(obj_path, iface_name, properties):
@@ -52,14 +52,14 @@
     if (os.path.isfile(filename)):
         if iface_name in properties:
             properties[iface_name] = {}
-        print("Loading from cache: "+filename)
+        print "Loading from cache: "+filename
         try:
             p = open(filename, 'rb')
-            data = pickle.load(p)
-            for prop in list(data.keys()):
+            data = cPickle.load(p)
+            for prop in data.keys():
                 properties[iface_name][prop] = data[prop]
 
         except Exception as e:
-            print("ERROR: Loading cache file: " + str(e))
+            print "ERROR: Loading cache file: " + str(e)
         finally:
             p.close()
