Provide a default value to the getattr call.
authorZac Medico <zmedico@gentoo.org>
Thu, 5 Apr 2007 22:27:54 +0000 (22:27 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 5 Apr 2007 22:27:54 +0000 (22:27 -0000)
svn path=/main/trunk/; revision=6344

pym/portage/data.py

index 69763aedda276c73fc359168fcb8869320ceb1db..a51990303f34d41b40433e1a74e186156616d91c 100644 (file)
@@ -15,7 +15,7 @@ bad = create_color_func("BAD")
 ostype=os.uname()[0]
 
 userland = None
-lchown = getattr(os, "lchown")
+lchown = getattr(os, "lchown", None)
 os.environ.setdefault("XARGS", "xargs")
 if ostype=="Linux" or ostype.lower().endswith("gnu"):
        userland="GNU"