Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita22c253

Browse files
authored
Merge pull request#98 from a-thieme/code-cleanup
code cleanup
2 parents7b56d41 +1e3ec0b commita22c253

36 files changed

+153
-170
lines changed

‎.gitignore‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ venv.bak/
112112
**/.DS_Store
113113
.vscode/
114114
.leveldb/
115-
.pytest_cache/
116115
repo.db
117116
NDN_Repo.egg-info/
118117

‎docs/src/configuration.rst‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,5 @@ To run ndn-python-repo with systemd on Linux, perform the following steps:
111111

112112
#. Examine logs::
113113

114-
$ sudo journalctl -u ndn-python-repo.service
114+
$ sudo journalctl -u ndn-python-repo.service
115+

‎docs/src/misc_pkgs/client_side.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ There are four parts:
1010

1111
#. **PutfileClient**: insert files into the repo.
1212
#. **GetfileClient**: get files from the repo.
13-
#. **DeleteClient**:detele data packets from the repo.
13+
#. **DeleteClient**:delete data packets from the repo.
1414
#. **CommandChecker**: check process status from the repo.
1515

1616
The example programs in:mod:`examples/` illustrate how to use these packages.

‎docs/src/misc_pkgs/pub_sub.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Process
2121

2222
Under the hood the ``PubSub`` module transmits a series of Interest and Data packets:
2323

24-
1. The subscriber calls ``subscribe(topic, cb)``. This makes thesubcriber listen on
24+
1. The subscriber calls ``subscribe(topic, cb)``. This makes thesubscriber listen on
2525
``"/<topic>/notify"``.
2626

2727
2. The publisher invokes ``publish(topic, msg)``. This method sends an Interest with name

‎docs/src/specification/security.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Required Settings
2020

2121
..warning::
2222
Unfortunately current implementation does not follow these requirements by default.
23-
This may cause some potentialvulnerbilities. Will be fixed in future versions.
23+
This may cause some potentialvulnerabilities. Will be fixed in future versions.
2424

2525

2626
Recommended Settings
@@ -31,7 +31,7 @@ Recommended Settings
3131

3232
- Since there is no replay attack, the Repo does not have to remember the list of ``SignatureNonce``.
3333

34-
- If the Repo is provided as a network service, thecertifcate obtained from the network provider should be used.
34+
- If the Repo is provided as a network service, thecertificate obtained from the network provider should be used.
3535
In this case, the prefix registration command and repo's publication data are signed using the same key.
3636

3737
- For example, if one employs a Repo as a public service of NDN testbed,

‎examples/command_checker.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@
66
"""
77

88
importargparse
9-
importasyncioasaio
109
importlogging
1110
fromndn.appimportNDNApp
1211
fromndn.encodingimportName
13-
fromndn.securityimportKeychainDigest
1412
fromndn_python_repo.clientsimportCommandChecker
1513

1614

‎examples/delfile.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@
66
"""
77

88
importargparse
9-
importasyncioasaio
109
importlogging
1110
fromndn.appimportNDNApp
1211
fromndn.encodingimportName
13-
fromndn.securityimportKeychainDigest
1412
fromndn_python_repo.clientsimportDeleteClient
1513

1614

@@ -61,7 +59,7 @@ def main():
6159
# process default values
6260
start_block_id=int(args.start_block_id)ifargs.start_block_idelseNone
6361
end_block_id=int(args.end_block_id)ifargs.end_block_idelseNone
64-
ifargs.register_prefix==None:
62+
ifargs.register_prefixisNone:
6563
args.register_prefix=args.name_at_repo
6664
args.register_prefix=Name.from_str(args.register_prefix)
6765

‎examples/getfile.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@
66
"""
77

88
importargparse
9-
importasyncioasaio
109
importlogging
1110
fromndn.appimportNDNApp
1211
fromndn.encodingimportName
13-
fromndn.securityimportKeychainDigest
1412
fromndn_python_repo.clientsimportGetfileClient
1513

1614

‎examples/leavesync.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
#!/usr/bin/env python3
21
importargparse
32
importlogging
43
fromndn.appimportNDNApp
54
fromndn.encodingimportName
65
fromndn.securityimportKeychainDigest
76
fromndn_python_repo.clientsimportSyncClient
8-
importuuid
97

108
asyncdefrun_leave_sync_client(app:NDNApp,**kwargs):
119
client=SyncClient(app=app,prefix=kwargs['client_prefix'],repo_name=kwargs['repo_name'])

‎examples/publisher.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ async def run_publisher(app: NDNApp, publisher_prefix: NonStrictName):
2222
msg=f'pubsub message generated at{str(datetime.datetime.now())}'.encode()
2323
awaitpb.publish(topic,msg)
2424

25-
# wait for msg to be fetched bysubsciber
25+
# wait for msg to be fetched bysubscriber
2626
awaitaio.sleep(10)
2727
app.shutdown()
2828

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp