Skip to content

Commit

Permalink
Added no internet option
Browse files Browse the repository at this point in the history
  • Loading branch information
hsercanatli committed Jan 2, 2017
1 parent 0f9c7f5 commit e78796e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions dunyadesktop_app/cultures/makam/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@


def is_dunya_up():
status = urllib.urlopen("http://dunya.compmusic.upf.edu/").getcode()
if not status is 200:
try:
status = urllib.urlopen("http://dunya.compmusic.upf.edu/").getcode()
if not status is 200:
return False
else:
return True
except IOError:
return False
else:
return True


def get_filenames_in_dir(dir_name, keyword='*.mp3', skip_foldername='',
match_case=True, verbose=None):
Expand Down

0 comments on commit e78796e

Please sign in to comment.