Skip to content

Commit

Permalink
Merge pull request #16 from TUW-GEO/copy_hotfix
Browse files Browse the repository at this point in the history
fixed dictionary overwrite error
  • Loading branch information
bbauerma committed Mar 23, 2020
2 parents b7cceda + d7a5991 commit 1e15436
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/geopathfinder/file_naming.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,17 +305,21 @@ def __build_map(self, fields, fields_def):
else:
elem = fields[name]

fn_part_kwargs = dict()
if 'delim' not in keys:
keys['delimiter'] = self.delimiter
fn_part_kwargs['delimiter'] = self.delimiter
else:
keys['delimiter'] = keys['delim']
del keys['delim']
fn_part_kwargs['delimiter'] = keys['delim']
if 'pad' not in keys:
keys['pad'] = self.pad
fn_part_kwargs['pad'] = self.pad
if 'len' in keys:
keys['length'] = keys['len']
del keys['len']
smart_fn_part = SmartFilenamePart(elem, **keys)
fn_part_kwargs['length'] = keys['len']
if 'decoder' in keys:
fn_part_kwargs['decoder'] = keys['decoder']
if 'encoder' in keys:
fn_part_kwargs['encoder'] = keys['encoder']

smart_fn_part = SmartFilenamePart(elem, **fn_part_kwargs)
fn_map[name] = smart_fn_part

return fn_map
Expand Down

0 comments on commit 1e15436

Please sign in to comment.