Permalink
Browse files

fixed method order

error_out was used before it was defined in case of an error with the propertiesfile.
  • Loading branch information...
1 parent d585720 commit b5c943edf62117a60e0db7f3d6d5caf27ec92e78 @RobinRamael committed Jun 26, 2013
Showing with 6 additions and 7 deletions.
  1. +6 −7 youtube.py
View
@@ -23,6 +23,12 @@
+def error_out(msg):
+ sys.stderr.write(msg + "\n")
+ sys.stderr.write("feed: " + FEEDURL + "\n")
+ sys.stderr.write("properties:" + str(props) + "\n")
+ exit(1)
+
try:
proppath = os.path.dirname(os.path.realpath(__file__)) + '/youtube.properties'
propfile = file(proppath, 'r')
@@ -118,13 +124,6 @@ def download_all_in_feed():
db.close()
-def error_out(msg):
- sys.stderr.write(msg + "\n")
- sys.stderr.write("feed: " + FEEDURL + "\n")
- sys.stderr.write("properties:" + str(props) + "\n")
- exit(1)
-
-
def main():
if not os.path.exists(VIDEODIR):
os.makedirs(VIDEODIR)

0 comments on commit b5c943e

Please sign in to comment.