Sophie

Sophie

distrib > Mageia > 1 > i586 > by-pkgid > eb43c1639e63ce8e8e66d43dc2d5039c > files > 30

hplip-3.11.7-1.1.mga1.src.rpm

diff -up hplip-3.10.9/fax/fax.py.fab-root-crash hplip-3.10.9/fax/fax.py
--- hplip-3.10.9/fax/fax.py.fab-root-crash	2010-11-12 10:36:30.504796972 +0000
+++ hplip-3.10.9/fax/fax.py	2010-11-12 10:38:39.906166234 +0000
@@ -203,17 +203,19 @@ class FaxAddressBook(object): # Pickle b
         self.load()
 
     def load(self):
-        self._fab = os.path.join(prop.user_dir, "fab.pickle")
-        #old_fab = os.path.join(prop.user_dir, "fab.db")
+        self._fab = "/dev/null"
+        if prop.user_dir != None:
+            self._fab = os.path.join(prop.user_dir, "fab.pickle")
+            #old_fab = os.path.join(prop.user_dir, "fab.db")
+
+            # Load the existing pickle if present
+            if os.path.exists(self._fab):
+                pickle_file = open(self._fab, "r")
+                self._data = cPickle.load(pickle_file)
+                pickle_file.close()
 
-        # Load the existing pickle if present
-        if os.path.exists(self._fab):
-            pickle_file = open(self._fab, "r")
-            self._data = cPickle.load(pickle_file)
-            pickle_file.close()
-
-        else:
-            self.save() # save the empty file to create the file
+            else:
+                self.save() # save the empty file to create the file
 
 
     def set(self, name, title, firstname, lastname, fax, groups, notes):