From c56d0ad7185f804f255715472ea40d971aa03e1b Mon Sep 17 00:00:00 2001 From: boyska Date: Thu, 15 Sep 2016 00:50:01 +0200 Subject: [PATCH] strings compatible with python 3.2 --- larigira/audioform_script.py | 8 ++++---- larigira/audioform_static.py | 6 +++--- larigira/audiogen_randomdir.py | 2 +- larigira/audiogen_static.py | 2 +- larigira/timeform_frequency.py | 10 +++++----- larigira/timeform_single.py | 6 +++--- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/larigira/audioform_script.py b/larigira/audioform_script.py index 2bcd006..2ab3366 100644 --- a/larigira/audioform_script.py +++ b/larigira/audioform_script.py @@ -3,13 +3,13 @@ from wtforms import StringField, validators, SubmitField, ValidationError class ScriptAudioForm(Form): - nick = StringField(u'Audio nick', validators=[validators.required()], + nick = StringField('Audio nick', validators=[validators.required()], description='A simple name to recognize this audio') - name = StringField(u'Name', validators=[validators.required()], + name = StringField('Name', validators=[validators.required()], description='filename (NOT path) of the script') - args = StringField(u'Arguments', + args = StringField('Arguments', description='arguments, separated by spaces') - submit = SubmitField(u'Submit') + submit = SubmitField('Submit') def populate_from_audiospec(self, audiospec): if 'nick' in audiospec: diff --git a/larigira/audioform_static.py b/larigira/audioform_static.py index 8f1e4cb..b172c8f 100644 --- a/larigira/audioform_static.py +++ b/larigira/audioform_static.py @@ -5,11 +5,11 @@ from wtforms import StringField, validators, SubmitField class StaticAudioForm(Form): - nick = StringField(u'Audio nick', validators=[validators.required()], + nick = StringField('Audio nick', validators=[validators.required()], description='A simple name to recognize this audio') - path = StringField(u'Path', validators=[validators.required()], + path = StringField('Path', validators=[validators.required()], description='Full path to audio file') - submit = SubmitField(u'Submit') + submit = SubmitField('Submit') def populate_from_audiospec(self, audiospec): if 'nick' in audiospec: diff --git a/larigira/audiogen_randomdir.py b/larigira/audiogen_randomdir.py index 40aeb31..11aee95 100644 --- a/larigira/audiogen_randomdir.py +++ b/larigira/audiogen_randomdir.py @@ -46,4 +46,4 @@ def generate(spec): prefix='audiogen-randomdir-') os.close(tmp[0]) shutil.copy(path, tmp[1]) - yield u'file://{}'.format(tmp[1]) + yield 'file://{}'.format(tmp[1]) diff --git a/larigira/audiogen_static.py b/larigira/audiogen_static.py index fb24c61..6691dc1 100644 --- a/larigira/audiogen_static.py +++ b/larigira/audiogen_static.py @@ -21,4 +21,4 @@ def generate(spec): prefix='audiogen-static-') os.close(tmp[0]) shutil.copy(path, tmp[1]) - yield u'file://{}'.format(tmp[1]) + yield 'file://{}'.format(tmp[1]) diff --git a/larigira/timeform_frequency.py b/larigira/timeform_frequency.py index d36f099..85efbf3 100644 --- a/larigira/timeform_frequency.py +++ b/larigira/timeform_frequency.py @@ -7,21 +7,21 @@ from wtforms import StringField, DateTimeField, validators, \ class FrequencyAlarmForm(Form): - nick = StringField(u'Alarm nick', validators=[validators.required()], + nick = StringField('Alarm nick', validators=[validators.required()], description='A simple name to recognize this alarm') - start = DateTimeField(u'Start date and time', + start = DateTimeField('Start date and time', validators=[validators.required()], description='Date before which no alarm will ring, ' 'expressed as YYYY-MM-DD HH:MM:SS') - end = DateTimeField(u'End date and time', + end = DateTimeField('End date and time', validators=[validators.optional()], description='Date after which no alarm will ring, ' 'expressed as YYYY-MM-DD HH:MM:SS') - interval = StringField(u'Frequency', + interval = StringField('Frequency', validators=[validators.required()], description='in seconds, or human-readable ' '(like 9w3d12h)') - submit = SubmitField(u'Submit') + submit = SubmitField('Submit') def populate_from_timespec(self, timespec): if 'nick' in timespec: diff --git a/larigira/timeform_single.py b/larigira/timeform_single.py index 572ed96..f56d425 100644 --- a/larigira/timeform_single.py +++ b/larigira/timeform_single.py @@ -5,12 +5,12 @@ from wtforms import StringField, DateTimeField, validators, SubmitField class SingleAlarmForm(Form): - nick = StringField(u'Alarm nick', validators=[validators.required()], + nick = StringField('Alarm nick', validators=[validators.required()], description='A simple name to recognize this alarm') - dt = DateTimeField(u'Date and time', validators=[validators.required()], + dt = DateTimeField('Date and time', validators=[validators.required()], description='Date to ring on, expressed as ' 'YYYY-MM-DD HH:MM:SS') - submit = SubmitField(u'Submit') + submit = SubmitField('Submit') def populate_from_timespec(self, timespec): if 'nick' in timespec: