Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
djrandom-py
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ale
djrandom-py
Commits
507af768
Commit
507af768
authored
13 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
do not die if the music_dir does not exist, just report an error
parent
65bc61ec
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
client/djrandom_client/client.py
+7
-3
7 additions, 3 deletions
client/djrandom_client/client.py
with
7 additions
and
3 deletions
client/djrandom_client/client.py
+
7
−
3
View file @
507af768
...
...
@@ -55,6 +55,10 @@ def run_client(server_url, music_dir, api_key, run_once, bwlimit, enable_watcher
if
bwlimit
:
throttle
.
set_rate_limit
(
bwlimit
)
# Warn on this condition, but don't die -- the directory might exist later!
if
not
os
.
path
.
isdir
(
music_dir
):
log
.
error
(
'
The music_dir you specified does not exist
'
)
if
enable_watcher
and
not
watcher_support
:
log
.
warn
(
'
inotify/fsevents support not enabled on this platform
'
)
enable_watcher
=
False
...
...
@@ -128,8 +132,8 @@ def main():
opts
,
args
=
parser
.
parse_args
()
if
not
opts
.
api_key
:
parser
.
error
(
'
You must specify an API Key
'
)
if
not
os
.
path
.
isdir
(
opts
.
music_dir
):
parser
.
error
(
'
The --music_dir you specified does not exist
'
)
music_dir
=
os
.
path
.
expanduser
(
opts
.
music_dir
)
if
args
:
parser
.
error
(
'
Too many arguments
'
)
...
...
@@ -142,7 +146,7 @@ def main():
do_realtime
=
not
opts
.
no_realtime_watch
daemonize
.
daemonize
(
opts
,
run_client
,
(
opts
.
server_url
,
opts
.
music_dir
,
opts
.
api_key
,
(
opts
.
server_url
,
music_dir
,
opts
.
api_key
,
opts
.
once
,
opts
.
bwlimit
,
do_realtime
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment