diff options
-rw-r--r-- | pym/portage_util.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pym/portage_util.py b/pym/portage_util.py index c329bc225..52cbaa34c 100644 --- a/pym/portage_util.py +++ b/pym/portage_util.py @@ -235,7 +235,7 @@ def getconfig(mycfg,tolerant=0,allow_sourcing=False): raise return None try: - lex=shlex.shlex(f) + lex = shlex.shlex(f, posix=True) lex.wordchars=string.digits+string.letters+"~!@#$%*_\:;?,./-+{}" lex.quotes="\"'" if allow_sourcing: @@ -244,7 +244,7 @@ def getconfig(mycfg,tolerant=0,allow_sourcing=False): key=lex.get_token() if key == "export": key = lex.get_token() - if (key==''): + if key is None: #normal end of file break; equ=lex.get_token() @@ -267,7 +267,7 @@ def getconfig(mycfg,tolerant=0,allow_sourcing=False): else: return mykeys val=lex.get_token() - if (val==''): + if val is None: #unexpected end of file #lex.error_leader(self.filename,lex.lineno) if not tolerant: |