Skip to content

Commit

Permalink
cli: fix outputs of primitive type objects with --get option; may clo…
Browse files Browse the repository at this point in the history
…se the issue #21
  • Loading branch information
ssato committed Aug 9, 2015
1 parent c94e481 commit ce2f9eb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions anyconfig/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import anyconfig.api as A
import anyconfig.compat
import anyconfig.globals
import anyconfig.mergeabledict


_ENCODING = locale.getdefaultlocale()[1]
Expand Down Expand Up @@ -216,6 +217,11 @@ def main(argv=None):
if err:
raise RuntimeError(err)

# Output primitive types as it is.
if not anyconfig.mergeabledict.is_mergeabledict_or_dict(data):
sys.stdout.write(str(data) + '\n')
return

if options.set:
A.set_(data, *(options.set.split('=')))

Expand Down

0 comments on commit ce2f9eb

Please sign in to comment.