import time
from CheckAndPostForSeriesSubmissions import checkNewSubmissions

# Refreshes all other scripts every couple of minutes
def refreshScripts():

    while True:
        checkNewSubmissions()
        timeToSleep = 900
        print("Sleeping for " + str(timeToSleep / 60) + " minutes.")
        time.sleep(timeToSleep)
        print("")



if __name__ == '__main__':
    refreshScripts()
import time
from CheckAndPostForSeriesSubmissions import checkNewSubmissions

# Refreshes all other scripts every couple of minutes
def refreshScripts():

    while True:
        try:
            checkNewSubmissions()
        except Exception as e:
            #traceback.print_exc()
            print("Found error, skipping this loop. ")
            print(str(e))
        timeToSleep = 900
        print("Sleeping for " + str(timeToSleep / 60) + " minutes.")
        time.sleep(timeToSleep)
        print("")



if __name__ == '__main__':
    refreshScripts()
Refresh script now displays error message
Refresh script now displays error message

  import time
  from CheckAndPostForSeriesSubmissions import checkNewSubmissions
  
  # Refreshes all other scripts every couple of minutes
  def refreshScripts():
  
      while True:
+         try:
-         checkNewSubmissions()
+             checkNewSubmissions()
+         except Exception as e:
+             #traceback.print_exc()
+             print("Found error, skipping this loop. ")
+             print(str(e))
          timeToSleep = 900
          print("Sleeping for " + str(timeToSleep / 60) + " minutes.")
          time.sleep(timeToSleep)
          print("")
  
  
  
  if __name__ == '__main__':
      refreshScripts()
Refresh script now displays error message
## Code Before:
import time
from CheckAndPostForSeriesSubmissions import checkNewSubmissions

# Refreshes all other scripts every couple of minutes
def refreshScripts():

    while True:
        checkNewSubmissions()
        timeToSleep = 900
        print("Sleeping for " + str(timeToSleep / 60) + " minutes.")
        time.sleep(timeToSleep)
        print("")



if __name__ == '__main__':
    refreshScripts()
## Instruction:
Refresh script now displays error message
## Code After:
import time
from CheckAndPostForSeriesSubmissions import checkNewSubmissions

# Refreshes all other scripts every couple of minutes
def refreshScripts():

    while True:
        try:
            checkNewSubmissions()
        except Exception as e:
            #traceback.print_exc()
            print("Found error, skipping this loop. ")
            print(str(e))
        timeToSleep = 900
        print("Sleeping for " + str(timeToSleep / 60) + " minutes.")
        time.sleep(timeToSleep)
        print("")



if __name__ == '__main__':
    refreshScripts()