From: Zac Medico Date: Wed, 12 Sep 2012 08:12:05 +0000 (-0700) Subject: chflags: fixed empty opts argument X-Git-Tag: v2.2.0_alpha127 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=98a5c7ae69499cc94a1d362aafb9bb2c1eb20ee8;p=portage.git chflags: fixed empty opts argument This broke in commit 09de8dc47ec48af2276dfa098dd5e1d3d09ddbdd. --- diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 8d5793c03..ee5104211 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -347,7 +347,11 @@ if platform.system() in ('FreeBSD',): @classmethod def chflags(cls, path, flags, opts=""): - cmd = ['chflags', opts, '%o' % (flags,), path] + cmd = ['chflags'] + if opts: + cmd.append(opts) + cmd.append('%o' % (flags,)) + cmd.append(path) encoding = _encodings['fs'] if sys.hexversion < 0x3000000 or sys.hexversion >= 0x3020000: # Python 3.1 does not support bytes in Popen args.