Skip to content

Commit 8ef69f3

Browse files
committed
Added more strict xml path.
1 parent 25ebd2f commit 8ef69f3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/magentoimagecleanup.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ def sizeof_fmt(num):
5757

5858
def getAllImagePath(self):
5959
tree = ElementTree.parse(os.path.join(self.magentoPath, self.LOCAL_XML))
60-
username = tree.find(".//username").text
61-
password = tree.find(".//password").text
62-
database = tree.find(".//dbname").text
63-
prefix = tree.find(".//table_prefix").text
64-
hostname = tree.find(".//host").text
60+
username = tree.find(".//connection/username").text
61+
password = tree.find(".//connection/password").text
62+
database = tree.find(".//connection/dbname").text
63+
hostname = tree.find(".//connection/host").text
64+
prefix = tree.find(".//db/table_prefix").text
6565

6666
# fixes
6767
prefix = prefix if prefix else ''

0 commit comments

Comments
 (0)