-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#346] Add a
skip-steam-check
CLI parameter
This should make Ice significantly easier to use on SteamOS, where everything has a `steam` prefix. Also refactor how the CLI interacts with IceEngine, as I want to stop passing around `options`. To stop doing the parameter duplication between `main` and `run` I extracted the "catch exceptions" functionality into a decorator.
- Loading branch information
Showing
3 changed files
with
52 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# encoding: utf-8 | ||
|
||
from logs import logger | ||
|
||
def catch_exceptions(msg): | ||
def decorator(func): | ||
def wrapped(*args, **kwargs): | ||
try: | ||
func(*args, **kwargs) | ||
except Exception as e: | ||
logger.exception(msg) | ||
return wrapped | ||
return decorator |
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