This website works better with JavaScript.
Home
Explore
Help
Sign In
jmg
/
bitelab
Watch
1
Star
0
Fork
0
Code
Issues
5
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
limit what gets imported when importing *
main
John-Mark Gurney
4 years ago
parent
05cdde6969
commit
b162960603
3 changed files
with
6 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-0
bitelab/config.py
+2
-0
bitelab/mocks.py
+2
-0
bitelab/snmp.py
+ 2
- 0
bitelab/config.py
View File
@@ -31,6 +31,8 @@ from pydantic import BaseSettings, Field
import asyncio
import aiokq
__all__ = [ 'Settings' ]
# How to deal w/ private vars:
# https://web.archive.org/web/20201113005838/https://github.com/samuelcolvin/pydantic/issues/655
class Settings(BaseSettings):
+ 2
- 0
bitelab/mocks.py
View File
@@ -28,6 +28,8 @@
from unittest.mock import AsyncMock, Mock
__all__ = [ 'wrap_subprocess_exec' ]
def wrap_subprocess_exec(mockobj, stdout=b'', stderr=b'', retcode=0):
assert isinstance(stdout, bytes)
assert isinstance(stderr, bytes)
+ 2
- 0
bitelab/snmp.py
View File
@@ -35,6 +35,8 @@ import asyncio
import subprocess
import unittest
__all__ = [ 'snmpget', 'snmpset', 'SNMPPower' ]
async def snmpget(host, oid, type):
p = await asyncio.create_subprocess_exec('snmpget', '-Oqv', host, oid,
stdout=subprocess.PIPE)
Write
Preview
Loading…
Cancel
Save