Skip to content

Commit 58447e0

Browse files
committed
FIXED BUG os.path.abspath with BIN_DIR added os.path.join
1 parent 86089b4 commit 58447e0

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

bdas/client2.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
__author__ = 'kaufmanno'
2020

21-
version = '2.29'
21+
version = '2.30'
2222
cl = 0 # current command line index
2323
cmd_lines = [] # command lines
2424
eod = False # end of download
@@ -269,15 +269,20 @@ def failed_download(msg):
269269
data = data[data.find(b'\xfd'):]
270270
logging.info('*** Downloading data ... ***')
271271
# check if there is a command file as parameter
272+
# logging.debug('Command file: %s length %d' %(cmdfile, len(cmd_lines)))
272273
if cmdfile != '':
273274
if cl < len(cmd_lines)+2:
274275
# create output file name
275276
cl += 1
276-
outfile = os.path.abspath(BIN_DIR, cmd_lines[cl].strip('\n') +
277-
time.strftime('_%Y%m%d_%H%M', time.gmtime())+'.bin')
277+
# logging.debug('*** command line %d: %s' %(cl, cmd_lines[cl]))
278+
outfile = os.path.abspath(os.path.join(BIN_DIR, cmd_lines[cl].strip('\n') +
279+
time.strftime('_%Y%m%d_%H%M', time.gmtime()) + '.bin'))
280+
# logging.debug('*** outfile: %s ***' %outfile)
278281
# read expected download duration
279282
cl += 1
283+
# logging.debug('*** command line %d: %s' %(cl, cmd_lines[cl]))
280284
dl_expected_duration = int(cmd_lines[cl])
285+
# logging.debug('*** Expected duration: %d ***' %dl_expected_duration)
281286
else:
282287
logging.error('*** Incorrect arguments in command file !')
283288
status = 2

0 commit comments

Comments
 (0)