Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
c4b1e2d1
Commit
c4b1e2d1
authored
Mar 06, 2015
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ReadJSShifts plugin handles correctly empty records
parent
f71ce75d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
dream/plugins/ReadJSShifts.py
dream/plugins/ReadJSShifts.py
+3
-3
No files found.
dream/plugins/ReadJSShifts.py
View file @
c4b1e2d1
...
...
@@ -53,7 +53,7 @@ class ReadJSShifts(plugin.InputPreparationPlugin, TimeSupportMixin):
# if all the records of that line are none then continue
toContinue
=
False
for
record
in
line
:
if
record
!=
None
:
if
record
!=
None
and
record
!=
''
:
toContinue
=
True
break
if
not
toContinue
:
...
...
@@ -64,12 +64,12 @@ class ReadJSShifts(plugin.InputPreparationPlugin, TimeSupportMixin):
timeEndList
=
[]
#if no shift start was given, assume standard 8:00
startTime
=
line
[
2
]
if
startTime
==
''
:
if
startTime
==
''
or
startTime
==
None
:
startTime
=
"08:00"
shiftStart
=
self
.
convertToSimulationTime
(
strptime
(
"%s %s"
%
(
line
[
1
],
startTime
),
'%Y/%m/%d %H:%M'
))
#if no shift end was given, assume standard 18:00
endTime
=
line
[
3
]
if
endTime
==
''
:
if
endTime
==
''
or
endTime
==
None
:
endTime
=
"18:00"
shiftEnd
=
self
.
convertToSimulationTime
(
strptime
(
"%s %s"
%
(
line
[
1
],
endTime
),
'%Y/%m/%d %H:%M'
))
timePair
=
self
.
correctTimePair
(
shiftStart
,
shiftEnd
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment