Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
I
inary
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
SulinOS
inary
Commits
44807cc9
Kaydet (Commit)
44807cc9
authored
Haz 07, 2006
tarafından
Eray Özkural
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
* fix: pass original args correctlyl, oops
üst
9c946358
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
12 deletions
+9
-12
api.py
pisi/api.py
+3
-3
__init__.py
pisi/cli/__init__.py
+3
-5
pisicli.py
pisi/cli/pisicli.py
+3
-4
No files found.
pisi/api.py
Dosyayı görüntüle @
44807cc9
...
...
@@ -63,7 +63,7 @@ def init(database = True, write = True,
if
ui
is
None
:
from
pisi.cli
import
CLI
if
options
:
ctx
.
ui
=
CLI
(
options
.
debug
)
ctx
.
ui
=
CLI
(
options
.
debug
,
options
.
verbose
)
else
:
ctx
.
ui
=
CLI
()
else
:
...
...
@@ -317,12 +317,12 @@ def check(package):
for
file
in
files
.
list
:
if
file
.
hash
and
file
.
type
!=
"config"
\
and
not
os
.
path
.
islink
(
'/'
+
file
.
path
):
ctx
.
ui
.
info
(
_
(
"Checking
%
s..."
)
%
file
.
path
,
False
,
True
)
ctx
.
ui
.
info
(
_
(
"Checking
%
s..."
)
%
file
.
path
,
noln
=
False
,
verbose
=
True
)
if
file
.
hash
!=
util
.
sha1_file
(
'/'
+
file
.
path
):
corrupt
.
append
(
file
)
ctx
.
ui
.
info
(
"Corrupt file:
%
s"
%
file
)
else
:
ctx
.
ui
.
info
(
"OK"
,
Fals
e
)
ctx
.
ui
.
info
(
"OK"
,
verbose
=
Tru
e
)
return
corrupt
def
index
(
dirs
=
None
,
output
=
'pisi-index.xml'
,
skip_sources
=
False
,
skip_signing
=
False
,
...
...
pisi/cli/__init__.py
Dosyayı görüntüle @
44807cc9
...
...
@@ -67,11 +67,9 @@ class CLI(UI):
def
info
(
self
,
msg
,
verbose
=
False
,
noln
=
False
):
# TODO: need to look at more kinds of info messages
# let's cheat from KDE :)
if
noln
:
msgend
=
''
else
:
msgend
=
'
\n
'
self
.
output
(
unicode
(
msg
)
+
msgend
,
verbose
=
verbose
)
if
not
noln
:
msg
+=
'
\n
'
self
.
output
(
unicode
(
msg
),
verbose
=
verbose
)
def
warning
(
self
,
msg
,
verbose
=
False
):
msg
=
unicode
(
msg
)
...
...
pisi/cli/pisicli.py
Dosyayı görüntüle @
44807cc9
...
...
@@ -82,13 +82,12 @@ class PreParser(OptionParser):
class
PisiCLI
(
object
):
def
__init__
(
self
,
args
=
None
):
def
__init__
(
self
,
orig_
args
=
None
):
# first construct a parser for common options
# this is really dummy
self
.
parser
=
PreParser
(
version
=
"
%
prog "
+
pisi
.
__version__
)
try
:
opts
,
args
=
self
.
parser
.
parse_args
(
args
=
args
)
opts
,
args
=
self
.
parser
.
parse_args
(
args
=
orig_
args
)
if
len
(
args
)
==
0
:
# more explicit than using IndexError
if
'version'
in
opts
:
self
.
parser
.
print_version
()
...
...
@@ -100,7 +99,7 @@ class PisiCLI(object):
except
ParserError
:
raise
Error
(
_
(
'Command line parsing error'
))
self
.
command
=
Command
.
get_command
(
cmd_name
,
args
=
args
)
self
.
command
=
Command
.
get_command
(
cmd_name
,
args
=
orig_
args
)
if
not
self
.
command
:
raise
Error
(
_
(
"Unrecognized command:
%
s"
)
%
cmd_name
)
...
...
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