File ntfs-config-1.0.1-environ.patch of Package ntfs-config

2nd hunk: ptyhon bails out if os.environ['X'] is used when X is not in env!

-> This is an important fix because as of openSUSE 10.3, we do not set
   XAUTHORITY, and as this part of the script is needed by every desktop
   user to be able to configure NTFS mounts! (most imporantly to en/disable
   read-write mount)

(1st hunk: Just a simple message grammar fix)
--- ntfs-config-root.in
+++ ntfs-config-root.in
@@ -60,7 +60,9 @@ if __name__ == '__main__' :
         elif test_cmd("kdesu") :
             auth = "kdesu"   
         else :
-            dialog("error", _("No authentication program founds"), \
+            # patch comment: There are no translations for this string so
+            # we can fix it without loosing strings or adapting .po files:
+            dialog("error", _("No authentication program found!"), \
                 _("ntfs-config need to be run as root, but I can't find\n"
                 "a graphical authentication program.\n" 
                 "You should install <i>gksu</i> or <i>kdesu</i>.\n" 
@@ -68,7 +70,8 @@ if __name__ == '__main__' :
                 "the terminal with <i>su</i> or <i>sudo</i>."))
             sys.exit()
         logging.info("Launching %s with %s..." % (PACKAGE, auth))
-        os.putenv("%s_user-XAUTHORITY" % PACKAGE, os.environ["XAUTHORITY"])
+        if 'XAUTHORITY' in os.environ:
+                os.putenv("%s_user-XAUTHORITY" % PACKAGE, os.environ['XAUTHORITY'])
         argv = [auth, "--", PACKAGE]
         argv.extend(sys.argv[1:])
         os.execvp(auth, argv)
openSUSE Build Service is sponsored by