- printNicely(red('OMG something is wrong with Twitter right now.'))
-
-
-def check_tweet_length():
- """
- Check tweet length (should be <= 140 chars)
- """
- length = len(g['stuff'])
- if length <= 140:
- return True
-
- printNicely(red("Message is too long: %s chars" % length))
- return False
+ printNicely(red('OMG something is wrong with Twitter API right now.'))
+ finally:
+ # Release the semaphore lock
+ c['lock'] = False