Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pycalibration
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
calibration
pycalibration
Commits
49cf1d36
Commit
49cf1d36
authored
4 years ago
by
Thomas Kluyver
Browse files
Options
Downloads
Patches
Plain Diff
Use subprocess.DEVNULL for output redirection
parent
9dcd5b33
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!331
Some cleanup in calibrate.py
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
xfel_calibrate/calibrate.py
+4
-6
4 additions, 6 deletions
xfel_calibrate/calibrate.py
with
4 additions
and
6 deletions
xfel_calibrate/calibrate.py
+
4
−
6
View file @
49cf1d36
...
@@ -11,7 +11,7 @@ from nbparameterise import (
...
@@ -11,7 +11,7 @@ from nbparameterise import (
import
os
import
os
import
pprint
import
pprint
import
re
import
re
from
subprocess
import
check_output
from
subprocess
import
check_output
,
DEVNULL
import
sys
import
sys
import
warnings
import
warnings
from
.settings
import
*
from
.settings
import
*
...
@@ -163,11 +163,9 @@ def extract_title_author_version(nb):
...
@@ -163,11 +163,9 @@ def extract_title_author_version(nb):
# in the _version.py file
# in the _version.py file
try
:
try
:
git_dir
=
os
.
path
.
join
(
PKG_DIR
,
'
..
'
,
'
.git
'
)
git_dir
=
os
.
path
.
join
(
PKG_DIR
,
'
..
'
,
'
.git
'
)
FNULL
=
open
(
os
.
devnull
,
'
w
'
)
version
=
check_output
([
version
=
check_output
([
'
git
'
,
'
git
'
,
f
'
--git-dir=
{
git_dir
}
'
,
'
describe
'
,
'
--tag
'
,
'
--git-dir={}
'
.
format
(
git_dir
),
],
stderr
=
DEVNULL
).
decode
(
'
utf8
'
)
'
describe
'
,
'
--tag
'
],
stderr
=
FNULL
).
decode
(
'
utf8
'
)
version
=
version
.
replace
(
"
\n
"
,
""
)
version
=
version
.
replace
(
"
\n
"
,
""
)
except
:
except
:
from
.VERSION
import
__version__
from
.VERSION
import
__version__
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment