title: invalid syntax (<unknown>, line 21)
body: <p>I get this error message when I try to debug I don't know whats wrong
  this is auto Reddit poster</p>
  
  <p>line 21  is     except Exception, e:</p>
  
  <p>this line of code seems fine I don't know why I'm getting an error.</p>
  
  <pre><code>
  import praw
  import json
  import urllib
  
  import settingslocal
  
  REDDIT_USERNAME = ''
  REDDIT_PASSWORD = ''
  
  try:
      from settingslocal import *
  except ImportError:
      pass
  
  def main():
      print ('starting')
  
      url = "http://api.ihackernews.com/page"
      try:
          result = json.load(urllib.urlopen(url))
      except Exception, e:
      return
  
      items = result['items'][:-1]
  
      reddit = praw.Reddit(user_agent='HackerNews bot by /u/mpdavis')
      reddit.login(REDDIT_USERNAME, REDDIT_PASSWORD)
      link_submitted = False
      for link in items:
          if link_submitted:
              return
          try:
              #Check to make sure the post is a link and not a post to another HN page. 
              if not 'item?id=' in link['url'] and not '/comments/' in link['url']:
                  submission = list(reddit.get_info(url=str(link['url'])))
                  if not submission:
                      subreddit = get_subreddit(str(link['title']))
                      print "Submitting link to %s: %s" % (subreddit, link['url'])
                      resp = reddit.submit(subreddit, str(link['title']), url=str(link['url']))
                      link_submitted = True
  
          except Exception, e:
              print e
              pass
  
  
  </code></pre>