Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update mail-alarm and usb_scan to python3 #5296

Merged
merged 1 commit into from
Jan 15, 2024
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
18 changes: 9 additions & 9 deletions scripts/mail-alarm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#
# mail-alarm: uses ssmtp to send a mail message, to pool:other_config:mail-destination
#
Expand All @@ -11,18 +11,18 @@
# the only thing that needs be set is pool:other-config:ssmtp-mailhub

from __future__ import print_function
import XenAPI
import sys

import json
import os
import re
import sys
import syslog
import tempfile
import traceback
import syslog
import json
import re
from xml.dom import minidom
from xml.sax.saxutils import unescape
from xml.parsers.expat import ExpatError
from socket import getfqdn
from xml.dom import minidom

import XenAPI
from xcp import branding

# Go read man ssmtp.conf
Expand Down
9 changes: 5 additions & 4 deletions scripts/usb_scan.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#
# Copyright (C) Citrix Systems Inc.
#
Expand All @@ -21,16 +21,17 @@
# 2. check if device can be passed through based on policy file
# 3. return the device info to XAPI in json format

from __future__ import print_function

import abc
import argparse
import json
import xcp.logger as log
import logging
import pyudev
import re
import sys

import pyudev
import xcp.logger as log


def log_list(l):
for s in l:
Expand Down