Update only if segment_info is not None

This commit is contained in:
ZyX 2013-04-03 23:19:35 +04:00
parent 878255aff0
commit e599691c52
1 changed files with 2 additions and 1 deletions

View File

@ -68,7 +68,8 @@ class Renderer(object):
def get_segment_info(self, segment_info): def get_segment_info(self, segment_info):
r = self.segment_info.copy() r = self.segment_info.copy()
r.update(segment_info) if segment_info:
r.update(segment_info)
if 'PWD' in r['environ']: if 'PWD' in r['environ']:
r['getcwd'] = lambda: r['environ']['PWD'] r['getcwd'] = lambda: r['environ']['PWD']
return r return r