forked from HelloZeroNet/ZeroNet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rev467, requirements.txt accept newer dependecies, Boost dbschema.jso…
…n, Move getDirname getFilename to helper, Verify optional files, Includes not allowed in user files, Optional files rules, Peer hashfield functions, Test optional files signing, Test file info, Test verify file, Test helpers
- Loading branch information
1 parent
a7d8d48
commit 9d7d4f1
Showing
22 changed files
with
484 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
gevent==1.0.1 | ||
msgpack-python==0.4.4 | ||
gevent>=1.0.1 | ||
msgpack-python>=0.4.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
class Spy: | ||
def __init__(self, obj, func_name): | ||
self.obj = obj | ||
self.func_name = func_name | ||
self.func_original = getattr(self.obj, func_name) | ||
self.calls = [] | ||
|
||
def __enter__(self, *args, **kwargs): | ||
def loggedFunc(cls, *args, **kwags): | ||
print "Logging", self, args, kwargs | ||
self.calls.append(args) | ||
return self.func_original(cls, *args, **kwargs) | ||
setattr(self.obj, self.func_name, loggedFunc) | ||
return self.calls | ||
|
||
def __exit__(self, *args, **kwargs): | ||
setattr(self.obj, self.func_name, self.func_original) |
Oops, something went wrong.