Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
shrapnel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
shrapnel
Commits
c783abd1
Commit
c783abd1
authored
Feb 19, 2015
by
Mark Peek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pep8 changes
parent
39c18f0d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
7 deletions
+6
-7
coro/log/__init__.py
coro/log/__init__.py
+3
-4
coro/log/asn1.py
coro/log/asn1.py
+1
-1
old/bdc.py
old/bdc.py
+1
-1
old/coro_mysql.py
old/coro_mysql.py
+1
-1
No files found.
coro/log/__init__.py
View file @
c783abd1
...
...
@@ -13,7 +13,7 @@ class StderrLogger:
self
.
saved_stderr
=
sys
.
stderr
# ISO 8601
time_format
=
'%Y-%m-%dT%H:%M:%S'
time_format
=
'%Y-%m-%dT%H:%M:%S'
def
log
(
self
,
*
data
):
self
.
saved_stderr
.
write
(
"%s %r
\
n
"
%
(
time
.
strftime
(
self
.
time_format
),
data
))
...
...
@@ -50,7 +50,7 @@ class Facility:
log
(
self
.
name
,
'exception'
,
coro
.
traceback_data
())
class
NoFacility
:
def
__call__
(
self
,
*
data
):
log
(
*
data
)
...
...
@@ -58,7 +58,7 @@ class NoFacility:
log
(
'exception'
,
coro
.
traceback_data
())
class
StderrRedirector
:
def
__init__
(
self
):
self
.
log
=
Facility
(
'stderr'
)
...
...
@@ -81,4 +81,3 @@ def set_logger (logger):
def
log
(
*
data
):
the_logger
.
log
(
*
data
)
coro/log/asn1.py
View file @
c783abd1
...
...
@@ -18,6 +18,6 @@ class Logger:
self
.
magic
,
struct
.
pack
(
'>I'
,
len
(
data
)),
data
)
)
)
self
.
file
.
flush
()
old/bdc.py
View file @
c783abd1
...
...
@@ -68,7 +68,7 @@ def main (addr):
if
__name__
==
'__main__'
:
import
argparse
ap
=
argparse
.
ArgumentParser
(
description
=
'shrapnel back door client'
)
ap
=
argparse
.
ArgumentParser
(
description
=
'shrapnel back door client'
)
ap
.
add_argument
(
'addr'
,
help
=
'server address'
,
default
=
'127.0.0.1:23'
,
metavar
=
"(HOST:PORT)|PATH"
)
args
=
ap
.
parse_args
()
if
':'
in
args
.
addr
:
...
...
old/coro_mysql.py
View file @
c783abd1
...
...
@@ -167,7 +167,7 @@ def dump_hex (s):
class
mysql_client
:
def
__init__
(
self
,
username
,
password
,
address
=
(
'127.0.0.1'
,
3306
),
debug
=
0
,
timeout
=
None
,
connect_timeout
=
None
):
debug
=
0
,
timeout
=
None
,
connect_timeout
=
None
):
# remember this for reconnect
self
.
username
=
username
...
...
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