LittleFrog commited on
Commit
d45f7f4
·
verified ·
1 Parent(s): 3932d00

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -70,7 +70,7 @@ def modify_file(file_path):
70
  """
71
  Modify specific lines in a file.
72
 
73
- Replace lines 107 and 108 with `raise ImportError`.
74
  """
75
  try:
76
  # Read the file contents
@@ -78,7 +78,7 @@ def modify_file(file_path):
78
  lines = file.readlines()
79
 
80
  # Modify the specified lines
81
- lines[106] = " raise ImportError("Custom import error message")\n" # Line 107 (index starts at 0)
82
  lines[107] = "" # Line 108, replace with an empty line or remove it
83
 
84
  # Write the modified lines back to the file
 
70
  """
71
  Modify specific lines in a file.
72
 
73
+ Replace lines 107 and 108 with a valid `raise ImportError` statement.
74
  """
75
  try:
76
  # Read the file contents
 
78
  lines = file.readlines()
79
 
80
  # Modify the specified lines
81
+ lines[106] = " raise ImportError(\"Custom import error message\")\n" # Line 107 (index starts at 0)
82
  lines[107] = "" # Line 108, replace with an empty line or remove it
83
 
84
  # Write the modified lines back to the file