Skip to content
Browse files

MB-6002: windows uses PATH instead of LD_LIBRARY_PATH

Change-Id: I924e1dd3a1be37f1651ee549272d326636a472ef
Reviewed-on: http://review.couchbase.org/18979
Reviewed-by: Ronnie Sun <ronnie@couchbase.com>
Reviewed-by: Bin Cui <bin.cui@gmail.com>
Tested-by: Steve Yen <steve.yen@gmail.com>
  • Loading branch information...
1 parent a98f4a4 commit 408cf80df6c9afd43d1d2e04570c0a787cd41ec9 @steveyen steveyen committed
Showing with 12 additions and 6 deletions.
  1. +12 −6 cbtransfer
View
18 cbtransfer
@@ -5,19 +5,25 @@
Data transfer tool for Couchbase.
"""
+import os
+import platform
+import sys
+
try:
import pump_sfd
except ImportError:
- print "warning: could not import couchstore module" \
- "; accessing local couchstore-files:// will not work" \
- "; please check your PYTHONPATH and LD_LIBRARY_PATH"
+ if platform.system() == "Windows":
+ 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))
import pump_transfer
-import sys
-import os
if __name__ == '__main__':
- if os.name == 'nt':
+ if platform.system() == 'Windows':
mydir = os.path.dirname(sys.argv[0])
bin_dir = os.path.join(mydir, '..')
path = [mydir, bin_dir, os.environ['PATH']]

0 comments on commit 408cf80

Please sign in to comment.
Something went wrong with that request. Please try again.