Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

CA-121667 Fix DeprecationWarning when running on newer Python versions #1

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion XSConsoleAuth.py
Expand Up @@ -13,7 +13,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

import os, popen2, pwd, re, sys, time, socket
import os, pwd, re, sys, time, socket
import PAM # From PyPAM module

from XSConsoleBases import *
Expand Down
14 changes: 7 additions & 7 deletions XSConsoleDataUtils.py
Expand Up @@ -13,7 +13,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

import os, popen2, re, tempfile
import os, subprocess, re, tempfile

from XSConsoleBases import *
from XSConsoleData import *
Expand Down Expand Up @@ -152,12 +152,12 @@ def USBFormat(self, inVDI):
partitionName = realDevice+'1'

# Write the partition table with one FAT32 partition filling the disk
popenObj = popen2.Popen4("/sbin/sfdisk --DOS --quiet '"+realDevice+"'")
popenObj.tochild.write(",,0C\n") # First partition, 0x0C => Windows LBA partition type
popenObj.tochild.write(";\n")
popenObj.tochild.write(";\n")
popenObj.tochild.write(";\n")
popenObj.tochild.close() # Send EOF
popenObj = subprocess.Popen("/sbin/sfdisk --DOS --quiet '"+realDevice+"'", stdin=subprocess.PIPE, stdout=subprocess.PIPE)
popenObj.stdin.write(",,0C\n") # First partition, 0x0C => Windows LBA partition type
popenObj.stdin.write(";\n")
popenObj.stdin.write(";\n")
popenObj.stdin.write(";\n")
popenObj.stdin.close() # Send EOF

while True:
try:
Expand Down