Skip to content

Commit

Permalink
MB-6242: emit stderr couchstore import warning only if needed
Browse files Browse the repository at this point in the history
Change-Id: Ib8e2db721b245c460e9be3997c79457d45041083
Reviewed-on: http://review.couchbase.org/19678
Reviewed-by: Bin Cui <bin.cui@gmail.com>
Tested-by: Steve Yen <steve.yen@gmail.com>
  • Loading branch information
steveyen committed Aug 16, 2012
1 parent 9e70483 commit 2d6fcce
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cbtransfer
Expand Up @@ -16,9 +16,11 @@ except ImportError:
p = "PATH"
else:
p = "LD_LIBRARY_PATH"
print ("warning: could not import couchstore module"
"; accessing local couchstore-files:// will not work"
"; please check your PYTHONPATH and %s environment variables" % (p))
for x in sys.argv:
if x.startswith("couchstore-files://"):
sys.exit("error: could not import couchstore module"
"; directly accessing local couchstore-files:// will not work"
"; please check your PYTHONPATH and %s environment variables" % (p))

import pump_transfer

Expand Down

0 comments on commit 2d6fcce

Please sign in to comment.