Skip to content

Commit

Permalink
remove old checks and notifications for error which are handled by `a…
Browse files Browse the repository at this point in the history
…rgparse` now
  • Loading branch information
Nama committed Jan 17, 2024
1 parent 1e66b9d commit e817657
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions swayrst/swayrst.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
appname = sys.argv[0]
workspace_mapping = None
debug = parser.parse_args().v
command = parser.parse_args().command
profile = parser.parse_args().profile
defaulted = []
couldnt_find = []
touched = []
Expand Down Expand Up @@ -119,20 +121,7 @@ def get_app(tree, app):


def main():
try:
command = parser.parse_args().command
except IndexError:
command = None
try:
profile = parser.parse_args().profile
except IndexError:
profile = None

if not command or not profile:
notify('Not enough parameters!', 'Exiting')
print(f'Usage: {sys.argv[0]} <load|save> <profilename>')
sys.exit(1)
elif not PATH:
if not PATH:
notify('Sway config not found!', 'Make sure to use a default config path (man sway)')
print(f'Sway config not found! Make sure to use a default config path (man sway)')
sys.exit(1)
Expand Down

0 comments on commit e817657

Please sign in to comment.