8000 The truth is out there... · fossabot/document-api-python@a885f15 · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

8000
Appearance settings

Commit a885f15

Browse files
committed
The truth is out there...
1 parent be4c9c8 commit a885f15

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

tableaudocumentapi/datasource.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import zipfile
88

99
import xml.etree.ElementTree as ET
10-
from tableaudocumentapi import Connection, containerfile
10+
from tableaudocumentapi import Connection, xfile
1111

1212

1313
class ConnectionParser(object):
@@ -61,7 +61,7 @@ def from_file(cls, filename):
6161
"Initialize datasource from file (.tds)"
6262

6363
if zipfile.is_zipfile(filename):
64-
dsxml = containerfile.get_xml_from_archive(filename).getroot()
64+
dsxml = xfile.get_xml_from_archive(filename).getroot()
6565
else:
6666
dsxml = ET.parse(filename).getroot()
6767
return cls(dsxml, filename)
@@ -80,7 +80,7 @@ def save(self):
8080

8181
# save the file
8282

83-
containerfile._save_file(self._filename, self._datasourceTree)
83+
xfile._save_file(self._filename, self._datasourceTree)
8484

8585
def save_as(self, new_filename):
8686
"""
@@ -93,7 +93,7 @@ def save_as(self, new_filename):
9393
Nothing.
9494
9595
"""
96-
containerfile._save_file(self._filename, self._datasourceTree, new_filename)
96+
xfile._save_file(self._filename, self._datasourceTree, new_filename)
9797

9898
###########
9999
# name

tableaudocumentapi/workbook.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import xml.etree.ElementTree as ET
1010

11-
from tableaudocumentapi import Datasource, containerfile
11+
from tableaudocumentapi import Datasource, xfile
1212

1313
###########################################################################
1414
#
@@ -37,7 +37,7 @@ def __init__(self, filename):
3737

3838
# Determine if this is a twb or twbx and get the xml root
3939
if zipfile.is_zipfile(self._filename):
40-
self._workbookTree = containerfile.get_xml_from_archive(
40+
self._workbookTree = xfile.get_xml_from_archive(
4141
self._filename)
4242
else:
4343
self._workbookTree = ET.parse(self._filename)
@@ -74,7 +74,7 @@ def save(self):
7474
"""
7575

7676
# save the file
77-
containerfile._save_file(self._filename, self._workbookTree)
77+
xfile._save_file(self._filename, self._workbookTree)
7878

7979
def save_as(self, new_filename):
8080
"""
@@ -87,7 +87,7 @@ def save_as(self, new_filename):
8787
Nothing.
8888
8989
"""
90-
containerfile._save_file(
90+
xfile._save_file(
9191
self._filename, self._workbookTree, new_filename)
9292

9393
###########################################################################
File renamed without changes.

0 commit comments

Comments
 (0)
0