diff options
| author | alecflett <alecflett@5914aa95-5b3a-0410-a3b5-7b719e7fe9b2> | 2009-09-21 20:51:30 +0000 |
|---|---|---|
| committer | alecflett <alecflett@5914aa95-5b3a-0410-a3b5-7b719e7fe9b2> | 2009-09-21 20:51:30 +0000 |
| commit | b6b6dbfb28fc158a559d0cef669ac6cda9d97be7 (patch) | |
| tree | 8eb666b7187bd61e6acc7e61d587ca645079ee3c /freebase/fcl/commands.py | |
| parent | 821f14dbdb3d8ff8cb6cd8dd78bb9b8c74836bf1 (diff) | |
fix when required arguments are not specified - at least spit a semi-sane message to the user rather than totally barfing
git-svn-id: http://freebase-python.googlecode.com/svn/trunk@215 5914aa95-5b3a-0410-a3b5-7b719e7fe9b2
Diffstat (limited to 'freebase/fcl/commands.py')
| -rwxr-xr-x | freebase/fcl/commands.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/freebase/fcl/commands.py b/freebase/fcl/commands.py index bb31d19..73b649e 100755 --- a/freebase/fcl/commands.py +++ b/freebase/fcl/commands.py @@ -30,7 +30,10 @@ import os, sys, re, time from fbutil import * from cmdutil import * -import simplejson +try: + import simplejson as json +except ImportError: + import json import freebase.rison as rison from freebase.api import attrdict @@ -410,9 +413,9 @@ def cmd_dump(fb, id): """ id = fb.absid(id) - import inspect + import inspection - r = inspect.inspect_object(fb.mss, id) + r = inspection.inspect_object(fb.mss, id) if r is None: raise CmdException('no match for id %r' % id) |
