@@ -53,13 +53,13 @@ def sentry_setup(opts, exec_env):
53
53
import psutil
54
54
import hashlib
55
55
from ..__about__ import __version__
56
- from .. utils . sentry import before_send
56
+
57
57
environment = "prod"
58
58
release = __version__
59
59
if not __version__ :
60
60
environment = "dev"
61
61
release = "dev"
62
- elif int (os .getenv ('FMRIPREP_DEV' , 0 )) or ('+' in __version__ ):
62
+ elif int (os .getenv ('FMRIPREP_DEV' , '0' )) or ('+' in __version__ ):
63
63
environment = "dev"
64
64
65
65
sentry_sdk .
init (
"https://[email protected] /1137693" ,
@@ -180,9 +180,9 @@ def before_send(event, hints):
180
180
msg = event ['logentry' ]['message' ]
181
181
if msg .startswith ("could not run node:" ):
182
182
return None
183
- elif msg .startswith ("Saving crash info to " ):
183
+ if msg .startswith ("Saving crash info to " ):
184
184
return None
185
- elif re .match ("Node .+ failed to run on host .+" , msg ):
185
+ if re .match ("Node .+ failed to run on host .+" , msg ):
186
186
return None
187
187
188
188
if 'breadcrumbs' in event and isinstance (event ['breadcrumbs' ], list ):
@@ -201,9 +201,9 @@ def _chunks(string, length=CHUNK_SIZE):
201
201
"""
202
202
Splits a string into smaller chunks
203
203
204
- >>> list(_chunks('some longer string', length=3))
204
+ >>> list(_chunks('some longer string. ', length=3))
205
205
['som', 'e l', 'ong', 'er ', 'str', 'ing', '.']
206
206
207
207
"""
208
- return (string [i :i + CHUNK_SIZE ]
208
+ return (string [i :i + length ]
209
209
for i in range (0 , len (string ), length ))
0 commit comments