From b6b6dbfb28fc158a559d0cef669ac6cda9d97be7 Mon Sep 17 00:00:00 2001 From: alecflett Date: Mon, 21 Sep 2009 20:51:30 +0000 Subject: 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 --- freebase/fcl/commands.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'freebase/fcl/commands.py') 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) -- cgit v1.3.1