Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
python-mqtt-gpio
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Alexander Wellbrock
python-mqtt-gpio
Commits
6a582aae
Commit
6a582aae
authored
Jan 18, 2021
by
Ellis Percival
Browse files
Options
Downloads
Patches
Plain Diff
Change gcd import
parent
af003226
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pi_mqtt_gpio/server.py
+10
-12
10 additions, 12 deletions
pi_mqtt_gpio/server.py
with
10 additions
and
12 deletions
pi_mqtt_gpio/server.py
+
10
−
12
View file @
6a582aae
...
...
@@ -2,26 +2,24 @@ import argparse
import
json
import
logging
import
logging.config
import
yaml
import
sys
import
socket
import
ssl
from
time
import
sleep
,
time
from
importlib
import
import_module
from
hashlib
import
sha1
import
threading
# For callback functions
from
fractions
import
gcd
# for calculating the callback periodic time
import
sys
import
threading
from
functools
import
reduce
from
hashlib
import
sha1
from
importlib
import
import_module
from
math
import
gcd
from
time
import
sleep
,
time
import
paho.mqtt.client
as
mqtt
import
cerberus
import
paho.mqtt.client
as
mqtt
import
yaml
from
pi_mqtt_gpio
import
CONFIG_SCHEMA
from
pi_mqtt_gpio.modules
import
PinPullup
,
PinDirection
,
InterruptEdge
,
BASE_SCHEMA
from
pi_mqtt_gpio.modules
import
BASE_SCHEMA
,
InterruptEdge
,
PinDirection
,
PinPullup
from
pi_mqtt_gpio.scheduler
import
Scheduler
,
Task
LOG_LEVEL_MAP
=
{
mqtt
.
MQTT_LOG_INFO
:
logging
.
INFO
,
mqtt
.
MQTT_LOG_NOTICE
:
logging
.
INFO
,
...
...
@@ -317,7 +315,7 @@ def install_missing_requirements(module):
if
pkgs_installed
.
find
(
pkg_resources
.
Requirement
.
parse
(
req
))
is
None
:
pkgs_required
.
append
(
req
)
if
pkgs_required
:
from
subprocess
import
check_call
,
CalledProcessError
from
subprocess
import
CalledProcessError
,
check_call
try
:
check_call
([
sys
.
executable
,
"
-m
"
,
"
pip
"
,
"
install
"
]
+
pkgs_required
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment