File tree Expand file tree Collapse file tree 5 files changed +30
-5
lines changed
seleniumbase/console_scripts Expand file tree Collapse file tree 5 files changed +30
-5
lines changed Original file line number Diff line number Diff line change @@ -263,7 +263,12 @@ def main():
263
263
file = codecs .open (file_path , "w+" , "utf-8" )
264
264
file .writelines ("\r \n " .join (data ))
265
265
file .close ()
266
- os .system ("sbase print %s -n" % file_name )
266
+ if " " not in file_name :
267
+ os .system ("sbase print %s -n" % file_name )
268
+ elif '"' not in file_name :
269
+ os .system ('sbase print "%s" -n' % file_name )
270
+ else :
271
+ os .system ("sbase print '%s' -n" % file_name )
267
272
success = (
268
273
"\n " + c1 + '* Chart Presentation: "' + file_name + '" was created! *'
269
274
"" + cr + "\n "
Original file line number Diff line number Diff line change @@ -700,7 +700,12 @@ def main():
700
700
file = codecs .open (file_path , "w+" , "utf-8" )
701
701
file .writelines ("\r \n " .join (data ))
702
702
file .close ()
703
- os .system ("sbase print %s -n" % file_path )
703
+ if " " not in file_path :
704
+ os .system ("sbase print %s -n" % file_path )
705
+ elif '"' not in file_path :
706
+ os .system ('sbase print "%s" -n' % file_path )
707
+ else :
708
+ os .system ("sbase print '%s' -n" % file_path )
704
709
os .remove (file_path )
705
710
706
711
success = (
Original file line number Diff line number Diff line change @@ -283,7 +283,12 @@ def main():
283
283
file = codecs .open (file_path , "w+" , "utf-8" )
284
284
file .writelines ("\r \n " .join (data ))
285
285
file .close ()
286
- os .system ("sbase print %s -n" % file_name )
286
+ if " " not in file_name :
287
+ os .system ("sbase print %s -n" % file_name )
288
+ elif '"' not in file_name :
289
+ os .system ('sbase print "%s" -n' % file_name )
290
+ else :
291
+ os .system ("sbase print '%s' -n" % file_name )
287
292
success = (
288
293
"\n " + c1 + '* Test file: "' + file_name + '" was created! *'
289
294
"" + cr + "\n "
Original file line number Diff line number Diff line change @@ -282,7 +282,12 @@ def main():
282
282
file = codecs .open (file_path , "w+" , "utf-8" )
283
283
file .writelines ("\r \n " .join (data ))
284
284
file .close ()
285
- os .system ("sbase print %s -n" % file_name )
285
+ if " " not in file_name :
286
+ os .system ("sbase print %s -n" % file_name )
287
+ elif '"' not in file_name :
288
+ os .system ('sbase print "%s" -n' % file_name )
289
+ else :
290
+ os .system ("sbase print '%s' -n" % file_name )
286
291
success = (
287
292
"\n " + c1 + '* Presentation: "' + file_name + '" was created! *'
288
293
"" + cr + "\n "
Original file line number Diff line number Diff line change @@ -158,7 +158,12 @@ def main():
158
158
recorded_filename = file_name [:- 3 ] + "_rec.py"
159
159
recordings_dir = os .path .join (dir_name , "recordings" )
160
160
recorded_file = os .path .join (recordings_dir , recorded_filename )
161
- os .system ("sbase print %s -n" % recorded_file )
161
+ if " " not in recorded_file :
162
+ os .system ("sbase print %s -n" % recorded_file )
163
+ elif '"' not in recorded_file :
164
+ os .system ('sbase print "%s" -n' % recorded_file )
165
+ else :
166
+ os .system ("sbase print '%s' -n" % recorded_file )
162
167
shutil .copy (recorded_file , file_path )
163
168
success = (
164
169
"\n " + c2 + "***" + cr + " RECORDING COPIED to: "
You can’t perform that action at this time.
0 commit comments