Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ disable=import-outside-toplevel,
comprehension-escape,
not-callable,
raise-missing-from,
super-with-arguments
super-with-arguments,
consider-using-dict-items,

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down
6 changes: 4 additions & 2 deletions azext_iot/common/certops.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ def create_self_signed_certificate(subject, valid_days, cert_output_dir, cert_on
cert_file = subject + '-cert.pem'
key_file = subject + '-key.pem'

open(join(cert_output_dir, cert_file), "wt").write(cert_dump)
with open(join(cert_output_dir, cert_file), "wt") as f:
f.write(cert_dump)

if not cert_only:
open(join(cert_output_dir, key_file), "wt").write(key_dump)
with open(join(cert_output_dir, key_file), "wt") as f:
f.write(key_dump)

result = {
'certificate': cert_dump,
Expand Down
2 changes: 1 addition & 1 deletion azext_iot/operations/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -2178,7 +2178,7 @@ def _iot_device_send_message(
target, device_id, data, properties=None, msg_count=1, qos=1
):
from azext_iot.operations._mqtt import build_mqtt_device_username
import paho.mqtt.publish as publish
from paho.mqtt import publish
from paho.mqtt import client as mqtt
import ssl
import os
Expand Down