dia-gov commited on
Commit
3ca8c62
·
verified ·
1 Parent(s): 980878b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -15,11 +15,17 @@ def main():
15
  # Ensure there are no import errors
16
  import app
17
 
18
- print("App module is correctly named, has no syntax errors, and no import errors.")
 
 
 
 
19
  except ImportError as e:
20
  print(f"ImportError: {e}")
21
  except SyntaxError as e:
22
  print(f"SyntaxError: {e}")
 
 
23
  except Exception as e:
24
  print(f"Error: {e}")
25
 
 
15
  # Ensure there are no import errors
16
  import app
17
 
18
+ # Ensure the app attribute exists in the app module
19
+ if not hasattr(app, "app"):
20
+ raise AttributeError(f"Attribute 'app' not found in module '{app_module}'.")
21
+
22
+ print("App module is correctly named, has no syntax errors, no import errors, and contains the 'app' attribute.")
23
  except ImportError as e:
24
  print(f"ImportError: {e}")
25
  except SyntaxError as e:
26
  print(f"SyntaxError: {e}")
27
+ except AttributeError as e:
28
+ print(f"AttributeError: {e}")
29
  except Exception as e:
30
  print(f"Error: {e}")
31