changeset fde74f132c39 in tryton-tips:default
details: https://hg.tryton.org/tryton-tips?cmd=changeset;node=fde74f132c39
description:
        Update to Python3
diffstat:

 tweet |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 6c96be1c7596 -r fde74f132c39 tweet
--- a/tweet     Wed Mar 20 08:42:19 2019 +0100
+++ b/tweet     Wed Mar 27 09:06:10 2019 +0100
@@ -1,6 +1,6 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 import os
-import ConfigParser
+import configparser
 from itertools import groupby
 from random import choice
 
@@ -12,6 +12,7 @@
 def block_separator(line):
     return line == '\n'
 
+
 tips = []
 with open(os.path.join(curdir, 'tips'), 'r') as fp:
     for key, lines in groupby(fp, block_separator):
@@ -20,7 +21,7 @@
         tips.append(' '.join(map(str.strip, lines)))
 tip = '#TrytonTips: %s' % choice(tips)
 
-config = ConfigParser.ConfigParser()
+config = configparser.ConfigParser()
 config.read(os.path.join(curdir, 'twitter.cfg'))
 
 twitter.Api(

Reply via email to