File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ Future work includes:
3030## Major versions
3131
3232### ` 3.* `
33+
3334Version ` 3.* ` of the pattern is currently constrained to support the general availability releases of coco.
3435
3536- (OpenShift Sandboxed Containers Operator) ` 1.10.* ` and above
@@ -43,6 +44,7 @@ The pattern has been tested on Azure for two installation methods:
43442 . Self managed OpenShift install using the ` openshift-install ` CLI.
4445
4546#### Known limitations
47+
4648[ Additional configuration] ( https://issues.redhat.com/browse/KATA-4107 ) is required to pull secrets from authenticated registries.
4749
4850
Original file line number Diff line number Diff line change 33import gzip
44import sys
55
6+
67def main ():
78 if len (sys .argv ) != 3 :
89 print ("Usage: python3 gzipper.py <file_to_gzip> <gzipped_file_name>" )
910 sys .exit (1 )
1011
1112 input_file = sys .argv [1 ]
1213 output_file = sys .argv [2 ]
13-
14+
1415 try :
1516 # Read the input file
16- with open (input_file , 'rb' ) as f_in :
17+ with open (input_file , "rb" ) as f_in :
1718 data = f_in .read ()
18-
19+
1920 # Compress and write to output file
20- with gzip .open (output_file , 'wb' ) as f_out :
21+ with gzip .open (output_file , "wb" ) as f_out :
2122 f_out .write (data )
22-
23+
2324 print (f"Successfully compressed '{ input_file } ' to '{ output_file } '" )
24-
25+
2526 except FileNotFoundError :
2627 print (f"Error: File '{ input_file } ' not found" )
2728 sys .exit (1 )
2829 except Exception as e :
2930 print (f"Error: { e } " )
3031 sys .exit (1 )
3132
33+
3234if __name__ == "__main__" :
3335 main ()
You can’t perform that action at this time.
0 commit comments