aboutsummaryrefslogtreecommitdiffstats
path: root/python/position_file_bowdst.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/position_file_bowdst.py')
-rw-r--r--python/position_file_bowdst.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/python/position_file_bowdst.py b/python/position_file_bowdst.py
index 95145e08..68702b67 100644
--- a/python/position_file_bowdst.py
+++ b/python/position_file_bowdst.py
@@ -19,7 +19,7 @@ asset_splits = {
}
-def gen_positions_and_fnames(cob, fund):
+def build_file(cob, fund):
for split, asset_classes in asset_splits.items():
buf, _ = build_position_file(cob, fund, asset_classes)
timestamp = datetime.datetime.now()
@@ -27,10 +27,10 @@ def gen_positions_and_fnames(cob, fund):
yield buf, dest
-def build_file(cob, fund, upload):
+def send_position_file(cob, fund, upload):
client = Client.from_creds("hm_globeop", folder="incoming")
attachments = []
- for buf, dest in gen_positions_and_fnames(cob, fund):
+ for buf, dest in build_file(cob, fund):
if upload:
client.put(buf, dest)
attachments.append(FileAttachment(name=dest, content=buf))
@@ -81,7 +81,7 @@ def main():
) and not args.manual: # We only want to upload if the previous business day was monthend
pass
else:
- build_file(args.date, "BOWDST", not args.no_upload)
+ send_position_file(args.date, "BOWDST", not args.no_upload)
if __name__ == "__main__":