Skip to content

Commit a32e221

Browse files
committed
Display error if creating "abc.py" (reserved Python module)
1 parent fed0368 commit a32e221

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

seleniumbase/console_scripts/sb_mkrec.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ def main():
106106
error_msg = 'File name cannot start with "-"!'
107107
elif "/" in str(file_name) or "\\" in str(file_name):
108108
error_msg = "File must be created in the current directory!"
109+
elif file_name == "abc.py":
110+
error_msg = '"abc.py" is a reserved Python module! Use another name!'
109111
elif os.path.exists(os.getcwd() + "/" + file_name):
110112
error_msg = 'File "%s" already exists in this directory!' % file_name
111113
if error_msg:

0 commit comments

Comments
 (0)