# Path: transitfeed/version.py



import codecs
import csv
import datetime
import math
import optparse
import random
import re
import socket
import sys
import time
import urllib2
    import inspect
    import traceback
      import transitfeed
      import copy
    import pytz
      import pytz
from . import errors
from .version import __version__
  from collections import defaultdict
    request = urllib2.Request(LATEST_RELEASE_VERSION_URL)

    try:
      response = urllib2.urlopen(request)
      content = response.read()
      m = re.search(r'version=(\d+\.\d+\.\d+)', content)
      if m:
        latest_version = m.group(1)

    except urllib2.HTTPError as e:
      description = ('During the new-version check, we failed to reach '
                     'transitfeed server: Reason: %s [%s].' %
                     (e.reason, e.code))
      problems.OtherProblem(
        description=description, type=errors.TYPE_NOTICE)
      return
    except urllib2.URLError as e:
      description = ('During the new-version check, we failed to reach '
                     'transitfeed server. Reason: %s.' % e.reason)
      problems.OtherProblem(
        description=description, type=errors.TYPE_NOTICE)
      return

  if not latest_version:
    description = ('During the new-version check, we had trouble parsing the '
                   'contents of %s.' % LATEST_RELEASE_VERSION_URL)
    problems.OtherProblem(
      description=description, type=errors.TYPE_NOTICE)
    return


# Path: transitfeed/version.py



# Path: transitfeed/util.py
import codecs
import csv
import datetime
import math
import optparse
import random
import re
import socket
import sys
import time
import urllib2
    import inspect
    import traceback
      import transitfeed
      import copy
    import pytz
      import pytz
from . import errors
from .version import __version__
  from collections import defaultdict

    request = urllib2.Request(LATEST_RELEASE_VERSION_URL)

    try:
      response = urllib2.urlopen(request)
      content = response.read()
      m = re.search(r'version=(\d+\.\d+\.\d+)', content)
      if m:
        latest_version = m.group(1)

    except urllib2.HTTPError as e:
      description = ('During the new-version check, we failed to reach '
                     'transitfeed server: Reason: %s [%s].' %
                     (e.reason, e.code))
      problems.OtherProblem(
        description=description, type=errors.TYPE_NOTICE)
      return
    except urllib2.URLError as e:
      description = ('During the new-version check, we failed to reach '
                     'transitfeed server. Reason: %s.' % e.reason)
      problems.OtherProblem(
        description=description, type=errors.TYPE_NOTICE)
      return

  if not latest_version:
    description = ('During the new-version check, we had trouble parsing the '
                   'contents of %s.' % LATEST_RELEASE_VERSION_URL)
    problems.OtherProblem(
      description=description, type=errors.TYPE_NOTICE)
    return


  newest_version = _MaxVersion([latest_version, __version__])