-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from dsgnr/py3_fix
Python3 Bytes conversion fix
- Loading branch information
Showing
3 changed files
with
12 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
#!/usr/bin/env python | ||
# postfixbuddy.py created by Daniel Hand ([email protected]) | ||
# postfixbuddy.py created by Daniel Hand ([email protected]) | ||
# This is a recreation of pfHandle.perl but in Python. | ||
|
||
from __future__ import absolute_import, division, print_function | ||
|
||
# Standard Library | ||
import argparse | ||
import os | ||
from os.path import join | ||
import sys | ||
import subprocess | ||
import sys | ||
from os.path import join | ||
from subprocess import call | ||
|
||
|
||
__version__ = '0.2.0' | ||
__version__ = '0.3.0' | ||
|
||
|
||
def get_options(): | ||
|
@@ -50,15 +50,15 @@ def get_options(): | |
|
||
# All variables defined in this script reply on finding the queue_directory. | ||
# This defines the PF_DIR variable which is called later on. | ||
PF_DIR = "" | ||
PF_DIR = '' | ||
try: | ||
GET_QUEUE_DIR = subprocess.Popen(['/usr/sbin/postconf', | ||
'-h', 'queue_directory'], | ||
stdout=subprocess.PIPE, | ||
stderr=subprocess.PIPE) | ||
OUTPUT, ERROR = GET_QUEUE_DIR.communicate() | ||
if OUTPUT: | ||
PF_DIR = OUTPUT.split()[0] | ||
PF_DIR = OUTPUT.split()[0].decode('utf-8') | ||
except OSError: | ||
pass | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
pylint==1.8.1 | ||
pycodestyle==2.5.0 | ||
pytest==3.2.3 | ||
pylint==2.9.3 | ||
pycodestyle==2.7.0 | ||
pytest==6.2.4 | ||
isort==5.9.1 |