-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH-29: Fixing pylint issues in top level files.
- Loading branch information
Showing
4 changed files
with
76 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,30 @@ | ||
#!/usr/bin/env python3 | ||
|
||
""" | ||
The main entry point for the application. | ||
""" | ||
|
||
import logging | ||
logging.basicConfig(filename='main.log', filemode='w', format='%(name)s - %(levelname)s - %(message)s') | ||
from project import control | ||
|
||
try: | ||
# Setting up logging | ||
logging.basicConfig( | ||
filename='main.log', | ||
filemode='w', | ||
format='%(name)s - %(levelname)s - %(message)s' | ||
) | ||
|
||
import project.control as control | ||
|
||
def main(): | ||
controller = control.ApplicationController() | ||
controller.run() | ||
def main(): | ||
""" The main function to instantiate and run the application controller. """ | ||
|
||
controller = control.ApplicationController() | ||
controller.run() | ||
|
||
if __name__ == "__main__": | ||
main() | ||
|
||
except Exception as e: | ||
logging.exception("caught at main") | ||
raise e # personal choice, still want to see error in IDE | ||
if __name__ == "__main__": | ||
try: | ||
main() | ||
except Exception as error: | ||
logging.exception("caught at main") | ||
raise error # personal choice, still want to see error in IDE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters