Skip to content

Commit 3c1f25a

Browse files
MarkusHackspacherespg
authored andcommitted
style of continuation
1 parent f9a9ef9 commit 3c1f25a

File tree

1 file changed

+24
-21
lines changed

1 file changed

+24
-21
lines changed

com/ArchiveService.py

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -216,14 +216,15 @@ def check_rinex_timespan_int(rinex, stn):
216216

217217
# how many seconds difference between
218218
# the rinex file and the record in the db
219-
stime_diff = abs((
220-
stn['ObservationSTime'] - rinex.datetime_firstObs).total_seconds())
221-
etime_diff = abs((
222-
stn['ObservationETime'] - rinex.datetime_lastObs) .total_seconds())
219+
stime_diff = abs((stn['ObservationSTime'] -
220+
rinex.datetime_firstObs).total_seconds())
221+
etime_diff = abs((stn['ObservationETime'] -
222+
rinex.datetime_lastObs) .total_seconds())
223223

224224
# at least four minutes different on each side
225-
if stime_diff <= 240 and etime_diff <= 240 and stn[
226-
'Interval'] == rinex.interval:
225+
if (stime_diff <= 240 and
226+
etime_diff <= 240 and
227+
stn['Interval'] == rinex.interval):
227228
return False
228229
else:
229230
return True
@@ -262,8 +263,8 @@ def error_handle(cnn, event, crinez, folder, filename, no_db_log=False):
262263

263264
mfile = filename
264265
try:
265-
mfile = os.path.basename(Utils.move(
266-
crinez, os.path.join(folder, filename)))
266+
mfile = os.path.basename(Utils.move(crinez,
267+
os.path.join(folder, filename)))
267268
except (OSError,
268269
ValueError) as e:
269270
message = 'could not move file into this folder!' + str(e) + \
@@ -389,10 +390,10 @@ def fill_event(ev, desc=None):
389390
ev['DOY'] = doy
390391

391392
# we can now make better reject and retry folders
392-
reject_folder = os.path.join(
393-
data_rejected, '%reason%' + '/%04i/%03i' % (year, doy))
394-
retry_folder = os.path.join(
395-
data_retry, '%reason%' + '/%04i/%03i' % (year, doy))
393+
reject_folder = os.path.join(data_rejected,
394+
'%reason%' + '/%04i/%03i' % (year, doy))
395+
retry_folder = os.path.join(data_retry,
396+
'%reason%' + '/%04i/%03i' % (year, doy))
396397

397398
try:
398399
# main try except block
@@ -420,8 +421,9 @@ def fill_event(ev, desc=None):
420421
# coordinates in the header for PPP.
421422
# put the correct APR coordinates in the header.
422423
# ppp didn't work, try using sh_rx2apr
423-
brdc = pyProducts.GetBrdcOrbits(
424-
Config.brdc_path, rinexinfo.date, rinexinfo.rootdir)
424+
brdc = pyProducts.GetBrdcOrbits(Config.brdc_path,
425+
rinexinfo.date,
426+
rinexinfo.rootdir)
425427

426428
# inflate the chi**2 limit to make sure it will pass
427429
# (even if we get a crappy coordinate)
@@ -492,8 +494,8 @@ def fill_event(ev, desc=None):
492494
RINEX file will not enter the archive.''' %
493495
(ppp.h[0]))
494496

495-
result, match, _ = ppp.verify_spatial_coherence(
496-
cnn, StationCode)
497+
result, match, _ = ppp.verify_spatial_coherence(cnn,
498+
StationCode)
497499

498500
if result:
499501
# insert: there is only 1 match with the same StationCode.
@@ -606,8 +608,9 @@ def fill_event(ev, desc=None):
606608
reject_folder = reject_folder.replace('%reason%', 'bad_rinex')
607609

608610
# add more verbose output
609-
fill_event(e.event, '\n%s: (file moved to %s)' % (os.path.relpath(
610-
crinez, Config.repository_data_in), reject_folder))
611+
fill_event(e.event, '\n%s: (file moved to %s)'
612+
% (os.path.relpath(crinez, Config.repository_data_in),
613+
reject_folder))
611614

612615
# error, move the file to rejected folder
613616
error_handle(cnn, e.event, crinez, reject_folder, filename)
@@ -617,9 +620,9 @@ def fill_event(ev, desc=None):
617620
retry_folder = retry_folder.replace('%reason%', 'rinex_issues')
618621

619622
# add more verbose output
620-
fill_event(e.event, '\n%s: (file moved to %s)' % (os.path.relpath(
621-
crinez, Config.repository_data_in),
622-
retry_folder))
623+
fill_event(e.event, '\n%s: (file moved to %s)'
624+
% (os.path.relpath(crinez, Config.repository_data_in),
625+
retry_folder))
623626
# error, move the file to rejected folder
624627
error_handle(cnn, e.event, crinez, retry_folder, filename)
625628

0 commit comments

Comments
 (0)