Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
python-defaults
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pkg
python-defaults
Commits
cf6a2c4e
Commit
cf6a2c4e
authored
14 years ago
by
Piotr Ożarowski
Browse files
Options
Downloads
Patches
Plain Diff
split('\n') communicate()'s stdout
parent
58966f1b
No related branches found
Branches containing commit
Tags
debian/2.6.5-9
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
debpython/pydist.py
+4
-3
4 additions, 3 deletions
debpython/pydist.py
pyclean
+1
-2
1 addition, 2 deletions
pyclean
pycompile
+3
-4
3 additions, 4 deletions
pycompile
with
8 additions
and
9 deletions
debpython/pydist.py
+
4
−
3
View file @
cf6a2c4e
...
...
@@ -118,8 +118,7 @@ def guess_dependency(req, version=None):
'
or your upstream author to fix requires.txt
'
)
return
set
()
# should we sys.exit(1) here?
req_dict
=
req_dict
.
groupdict
()
name
=
req_dict
[
'
name
'
].
lower
()
details
=
data
.
get
(
name
)
details
=
data
.
get
(
req_dict
[
'
name
'
].
lower
())
if
details
:
for
item
in
details
:
if
version
not
in
item
.
get
(
'
versions
'
,
version
):
...
...
@@ -157,7 +156,9 @@ def guess_dependency(req, version=None):
exit
(
8
)
result
=
set
()
for
line
in
stdout
:
for
line
in
stdout
.
split
(
'
\n
'
):
if
not
line
.
strip
():
continue
result
.
add
(
line
.
split
(
'
:
'
)[
0
])
if
len
(
result
)
>
1
:
log
.
error
(
'
more than one package name found for %s dist
'
,
name
)
...
...
This diff is collapsed.
Click to expand it.
pyclean
+
1
−
2
View file @
cf6a2c4e
...
...
@@ -91,8 +91,7 @@ def get_package_files(package_name):
if
process
.
returncode
!=
0
:
log
.
error
(
'
cannot get content of %s
'
,
package_name
)
sys
.
exit
(
2
)
for
line
in
stdout
:
line
=
line
.
strip
(
'
\n
'
)
for
line
in
stdout
.
split
(
'
\n
'
):
if
line
.
endswith
(
'
.py
'
):
yield
line
...
...
This diff is collapsed.
Click to expand it.
pycompile
+
3
−
4
View file @
cf6a2c4e
...
...
@@ -26,8 +26,8 @@ from __future__ import with_statement
import
logging
import
optparse
import
sys
from
os
import
environ
,
listdir
,
mkdir
,
walk
from
os.path
import
abspath
,
dirname
,
exists
,
isdir
,
isfile
,
join
from
os
import
environ
,
listdir
,
walk
from
os.path
import
abspath
,
exists
,
isdir
,
isfile
,
join
from
subprocess
import
PIPE
,
Popen
sys
.
path
.
insert
(
1
,
'
/usr/share/python/
'
)
from
debpython.version
import
SUPPORTED
,
debsorted
,
vrepr
,
\
...
...
@@ -74,8 +74,7 @@ def get_package_files(package_name):
if
process
.
returncode
!=
0
:
log
.
error
(
'
cannot get content of %s
'
,
package_name
)
exit
(
2
)
for
line
in
stdout
:
line
=
line
.
strip
(
'
\n
'
)
for
line
in
stdout
.
split
(
'
\n
'
):
if
line
.
endswith
(
'
.py
'
):
yield
line
...
...
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