Skip to content

Commit

Permalink
fix ?
Browse files Browse the repository at this point in the history
  • Loading branch information
VanyaBelyaev committed Aug 25, 2024
1 parent 9d59a43 commit d3d7ef7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions ostap/io/compress_shelve.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#*- coding: utf-8 -*-
# =============================================================================
# @file compress_shelve.py
#
Expand Down Expand Up @@ -312,8 +312,9 @@ def __init__(

self.sync ()

self.__taropts = 'x:gz'

self.__taropts = 'x:gz' if (3,0)<= python_version else 'w:gz'


@property
def dbtype ( self ) :
"""`dbtype' : the underlying type of database"""
Expand Down Expand Up @@ -396,12 +397,13 @@ def tar ( self ) :

@property
def taropts ( self ) :
"""`taropts` : options for tar-archive compression"""
"""`taropts` : options to open tar-fiel for write"""
return self.__taropts
@taropts.setter
def taropts ( self , value ) :
self.__taropts = value

if python_version < (3,0) and value and 'x' == value[0] : value = 'w' + value[1:]
self.__taropts = value

# =========================================================================
## valid, opened DB
def __nonzero__ ( self ) :
Expand Down

0 comments on commit d3d7ef7

Please sign in to comment.